<?php
$datas = array();
//公众号相关
$datas[] = "
DROP TABLE IF EXISTS  `weixin_admin`;\n
CREATE TABLE `weixin_admin` (
`user` text NOT NULL,
`pwd` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

DROP TABLE IF EXISTS  `weixin_cj_shady`;\n
CREATE TABLE `weixin_cj_shady` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone` varchar(11) NOT NULL,
  `grade` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

insert into `weixin_cj_shady`(`id`,`phone`,`grade`) values
('1','13000000000','3');\n
DROP TABLE IF EXISTS  `weixin_cookie`;\n
CREATE TABLE `weixin_cookie` (
  `cookie` text NOT NULL,
  `cookies` text NOT NULL,
  `token` int(11) NOT NULL,
  `id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;\n

DROP TABLE IF EXISTS  `weixin_autoreply`;\n
CREATE TABLE `weixin_autoreply` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `message` varchar(200) DEFAULT NULL COMMENT '用户消息',
  `title` varchar(200) DEFAULT NULL COMMENT '标题',
  `description` varchar(500) DEFAULT NULL COMMENT '描述',
  `picurl` varchar(300) DEFAULT NULL COMMENT '图片连接',
  `url` varchar(300) DEFAULT NULL COMMENT '内容连接',
  `created_at` int(11) DEFAULT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n

insert into `weixin_cookie`(`cookie`,`cookies`,`token`,`id`) values
('','','0','1');\n
DROP TABLE IF EXISTS  `weixin_flag`;\n
CREATE TABLE `weixin_flag` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `openid` varchar(255) NOT NULL,
  `flag` int(11) DEFAULT NULL,
  `vote` varchar(255) DEFAULT NULL,
  `nickname` varchar(255) DEFAULT NULL,
  `avatar` text,
  `content` text,
  `fakeid` varchar(255) DEFAULT NULL,
  `sex` varchar(255) DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  `othid` int(11) NOT NULL DEFAULT '0',
  `cjstatu` tinyint(4) NOT NULL DEFAULT '0',
  `datetime` int(10) DEFAULT NULL,
  `verify` varchar(4) DEFAULT NULL,
  `phone` varchar(11) DEFAULT NULL,
  `shady` tinyint(2) NOT NULL DEFAULT '0',
  `cjgrade` tinyint(1) DEFAULT NULL,
  `fromtype` varchar(25) DEFAULT NULL,
  `rentopenid` varchar(28) DEFAULT NULL,
  `signname` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `openid` (`openid`),
  KEY `openid_2` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

DROP TABLE IF EXISTS  `weixin_log`;\n
CREATE TABLE `weixin_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `echostr` mediumtext,
  `created_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n

insert into `weixin_log`(`id`,`echostr`,`created_at`) values
('1','帮助','1448964405'),
('2','reply start','1448964405'),
('3','welcome start','1448964405'),
('4','NewsResponseItem','1448964405'),
('5','welcome end','1448964405'),
('6','','1448964405'),
('7','reply end','1448964405'),
('8','NewsResponseItem','1448964405'),
('9','帮助','1448964448'),
('10','reply start','1448964448'),
('11','welcome start','1448964448'),
('12','欢迎关注微赢助手','1448964448'),
('13','welcome end','1448964448'),
('14','','1448964448'),
('15','reply end','1448964448'),
('16','回复【重置】重新获取信息，回复【帮助】查看帮助信息！','1448964448'),
('17','帮助','1448964482'),
('18','reply start','1448964482'),
('19','欢迎关注微赢助手','1448964482'),
('20','【上墙】发送【任意内容】即可上墙','1448964482'),
('21','【图片】直接发送图片即可上墙','1448964482'),
('22','【抽奖】发送消息上墙后将获得抽奖资格，回复【查询】查看中奖状态','1448964482'),
('23','【签到】您已经成功签到！','1448964482'),
('24','【对对碰】发送消息上墙后将获得对对碰抽奖资格','1448964482'),
('25','【投票】参与投票请回复【投票】','1448964482'),
('26','【摇一摇】参与摇一摇请回复【摇一摇】','1448964482'),
('27','Array','1448964482'),
('28','reply end','1448964482'),
('29','回复【重置】重新获取信息，回复【帮助】查看帮助信息！','1448964482'),
('30','123','1448964489'),
('31','亲爱的【方迎】','1448964489'),
('32','您的消息已经成功发送，等待管理员审核后即可上墙，请多关注墙上内容！','1448964489'),
('33','回复【重置】重新获取信息，回复【帮助】查看帮助信息！','1448964489'),
('34','测试','1448964549'),
('35','亲爱的【方迎】','1448964549'),
('36','您的消息已经成功发送，等待管理员审核后即可上墙，请多关注墙上内容！','1448964549'),
('37','回复【重置】重新获取信息，回复【帮助】查看帮助信息！','1448964549'),
('38','check2 2','1449019250');\n
DROP TABLE IF EXISTS  `weixin_plugs`;\n
CREATE TABLE `weixin_plugs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(255) NOT NULL,
  `keyword` varchar(255) NOT NULL,
  `files` varchar(255) NOT NULL,
  `hasfiles` tinyint(1) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL DEFAULT '0',
  `switch` tinyint(4) NOT NULL DEFAULT '0',
  `needword` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

insert into `weixin_plugs`(`id`,`name`,`title`,`description`,`keyword`,`files`,`hasfiles`,`status`,`switch`,`needword`) values
('1','cj','抽奖','【抽奖】发送消息上墙后将获得抽奖资格，回复【~~[keyword]~~】查看中奖状态','查询','','0','0','1','0'),
('2','qdq','签到墙','【签到】点击签到连接进行签到！','签到墙','','0','0','1','0'),
('3','ddp','对对碰','【对对碰】发送消息上墙后将获得对对碰抽奖资格','对对碰','','0','0','1','0'),
('5','ppl','拍拍乐','【拍拍乐】参与拍拍乐请回复【~~[keyword]~~】	','拍拍乐','ppl.ext','1','4','0','1'),
('6','vote','投票','【投票】参与投票请回复【~~[keyword]~~】','投票','vote.ext','1','0','1','1'),
('7','shake','摇一摇','【摇一摇】参与摇一摇请回复【~~[keyword]~~】','摇一摇','shake.ext','1','0','1','1');\n
DROP TABLE IF EXISTS  `weixin_shake_toshake`;\n
CREATE TABLE `weixin_shake_toshake` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone` varchar(255) NOT NULL,
  `wecha_id` varchar(255) NOT NULL,
  `point` int(11) NOT NULL,
  `avatar` text NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `wecha_id` (`wecha_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

insert into `weixin_shake_toshake`(`id`,`phone`,`wecha_id`,`point`,`avatar`) values
('2','e4b880e6b0a7e58c96e4ba8ce6b0a2','oTKXgt__SLoa7vDdZ8Q9T7R7ytIw','0',''),
('3','e6b4aae4bf8ae8a395','oTKXgt42dRwyoZkFyO31wPv-_EZ0','0','http://wx.qlogo.cn/mmopen/h88Ya5MpD9DAQWwaZGm4dLoda8fSUBBy7nLIbbMaxoXCKKvjnoBSlicsiau9kPTLyBibD2pVr7EQLicMsEN05FYr9a7KKFFtEciaV/0'),
('4','e5bfa0e4bfa1','oTKXgt5FV7qZp-cr5588KIzUnsZw','94','http://wx.qlogo.cn/mmopen/Q3auHgzwzM4ZDibvhlsRsTcHKLwV0ntoZLnxllgncn6Xzia6C9R0844qwfUckZlw0Lg8dDJzeb6Ggswdr2E0hYntvYtPX5GGnjVdia5UkmibvNw/0'),
('5','e69d8e','oTKXgt4tc9rhpxajfTW5eICHCPpQ','38','http://wx.qlogo.cn/mmopen/WSVbUiauYsvs8FOHeTaaaicL6bU9XSY8c50q61WV9A5kTOubo7gsKib0iaqhPO9cd4fYUib1FlJ196ly1JrC3UERZdyR4B4dmU5Uia/0'),
('7','e69e97e58b8740e5b883e6b3a2','oTKXgtzvkwQT0Ce0Sqm0d_0u6iuU','0','http://wx.qlogo.cn/mmopen/KibNTxCuicLqice3rxnG4iciaibfOlPTNGLMGA0ibicicQJEzuwopXFjic4nHYxq9QiadYfzKR0nMMEmaKS7Eu517QMICvNNmmQfRQlUH4k/0');\n
DROP TABLE IF EXISTS  `weixin_vote`;\n
CREATE TABLE `weixin_vote` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` text NOT NULL,
  `res` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `res` (`res`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

insert into `weixin_vote`(`id`,`name`,`res`) values
('1','微信上墙','1'),
('2','图片上墙','1'),
('3','签到墙','0'),
('4','抽奖','0'),
('5','摇一摇','0'),
('6','对对碰','0'),
('7','拍拍乐','0');\n
DROP TABLE IF EXISTS  `weixin_wall`;\n
CREATE TABLE `weixin_wall` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `messageid` varchar(255) DEFAULT NULL,
  `fakeid` varchar(255) DEFAULT NULL,
  `num` int(11) DEFAULT NULL,
  `content` text,
  `nickname` text,
  `avatar` text,
  `ret` int(11) DEFAULT NULL,
  `fromtype` varchar(255) DEFAULT NULL,
  `image` text,
  `datetime` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

DROP TABLE IF EXISTS  `weixin_wall_config`;\n
CREATE TABLE `weixin_wall_config` (
  `huati` text NOT NULL,
  `huanying1` text NOT NULL,
  `huanying2` text NOT NULL,
  `success` text NOT NULL,
  `endtail` text NOT NULL,
  `acttitle` text NOT NULL,
  `isopen` int(1) NOT NULL,
  `endshake` int(11) NOT NULL,
  `show_num` int(11) NOT NULL,
  `shenghe` int(11) NOT NULL,
  `cjreplay` tinyint(4) NOT NULL DEFAULT '0',
  `timeinterval` int(3) NOT NULL,
  `shakeopen` tinyint(4) NOT NULL DEFAULT '1',
  `shakekeyword` varchar(255) NOT NULL,
  `voteopen` tinyint(4) NOT NULL DEFAULT '1',
  `votekeyword` varchar(255) NOT NULL,
  `votetitle` text NOT NULL,
  `votefresht` tinyint(4) NOT NULL,
  `fusionopen` tinyint(4) NOT NULL DEFAULT '0',
  `fusionkeyword` varchar(255) NOT NULL,
  `fusionurl` varchar(255) NOT NULL,
  `fusiontoken` varchar(255) NOT NULL,
  `circulation` tinyint(1) NOT NULL DEFAULT '0',
  `refreshtime` tinyint(2) NOT NULL,
  `voteshowway` tinyint(1) DEFAULT '1',
  `votecannum` varchar(255) DEFAULT '1',
  `black_word` text,
  `cj_switch` tinyint(1) NOT NULL DEFAULT '0',
  `cj_condition` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1表示需要上墙2表示签到即可',
  `ddp_switch` tinyint(1) NOT NULL DEFAULT '0',
  `weibo_switch` tinyint(1) NOT NULL DEFAULT '0',
  `weixin_switch` tinyint(1) NOT NULL DEFAULT '0',
  `web_root` varchar(255) NOT NULL,
  `screenpaw` varchar(255) NOT NULL,
  `shady_switch` tinyint(1) NOT NULL DEFAULT '0',
  `qiandao_switch` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1手机号签到2签到页面签到',
  `rentweixin` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0不借用其他微信号获取用户信息1借用其他微信服务号获取用户信息',
  `name_switch` tinyint(1) NOT NULL DEFAULT '2' COMMENT '1记录姓名2不记录',
  `phone_switch` tinyint(1) NOT NULL DEFAULT '2' COMMENT '1记录手机号2不记录'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

insert into `weixin_wall_config`(`huati`,`huanying1`,`huanying2`,`success`,`endtail`,`acttitle`,`isopen`,`endshake`,`show_num`,`shenghe`,`cjreplay`,`timeinterval`,`shakeopen`,`shakekeyword`,`voteopen`,`votekeyword`,`votetitle`,`votefresht`,`fusionopen`,`fusionkeyword`,`fusionurl`,`fusiontoken`,`circulation`,`refreshtime`,`voteshowway`,`votecannum`,`black_word`,`cj_switch`,`cj_condition`,`ddp_switch`,`weibo_switch`,`weixin_switch`,`web_root`,`screenpaw`,`shady_switch`,`qiandao_switch`,`rentweixin`,`name_switch`,`phone_switch`) values
('','扫描二维码，按照提示回复即可上墙','赶快上墙体验吧！！！','你已经成功发送，等待审核通过即可上墙了','回复【重置】重新获取信息，回复【帮助】查看帮助信息！','激情狂欢夜','2','200','9','0','1','3','1','摇一摇','1','投票','你最喜欢微信墙的哪个功能？','5','0','','','','1','1','3','1','操,sb,傻逼,艹,日你妈,干你妹,老子,bitch,婊子','1','1','1','0','1','','admin','0','1',0,2,2);\n
DROP TABLE IF EXISTS  `weixin_wall_num`;\n

CREATE TABLE `weixin_wall_num` (
  `num` int(11) NOT NULL,
  `lastmessageid` varchar(255) NOT NULL,
  PRIMARY KEY (`num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

insert into `weixin_wall_num`(`num`,`lastmessageid`) values
('1','0');\n
DROP TABLE IF EXISTS  `weixin_weibo_config`;\n
CREATE TABLE `weixin_weibo_config` (
  `id` int(11) NOT NULL,
  `nickname` varchar(255) NOT NULL,
  `access_token` varchar(255) NOT NULL,
  `folllow` tinyint(1) NOT NULL DEFAULT '1',
  `mention` tinyint(1) NOT NULL DEFAULT '0',
  `letter` tinyint(1) NOT NULL DEFAULT '1',
  `erweima` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

insert into `weixin_weibo_config`(`id`,`nickname`,`access_token`,`folllow`,`mention`,`letter`,`erweima`) values
('1','vdcom','vdcom01','1','0','1','http://shop35088558.taobao.com/');\n

DROP TABLE IF EXISTS  `weixin_weixin_config`;\n
CREATE TABLE `weixin_weixin_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nickname` varchar(255) NOT NULL,
  `dianplu_wxh` varchar(255) NOT NULL,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `erweima` varchar(255) NOT NULL,
  `appid` varchar(64) DEFAULT NULL COMMENT '微信appid',
  `appsecret` varchar(128) DEFAULT NULL COMMENT '微信appsecret',
  `token` varchar(128) DEFAULT NULL COMMENT '微信通信token',
  `appid2` varchar(64) DEFAULT NULL COMMENT '借用的微信appid',
  `appsecret2` varchar(128) DEFAULT NULL COMMENT '借用的微信appsecret',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;\n

insert into `weixin_weixin_config`(`id`,`nickname`,`dianplu_wxh`,`username`,`password`,`erweima`,`appid`,`appsecret`,`token`,`appid2`,`appsecret2`) values
('1','现场活动','现场活动','xianchanghuodong','xxxxxxxxx','http://xianchang.wxmiao.com/data/images/weixin-ma.jpg','wx6e4c7c28f4ad4670','e91bd7c0255d5696499934db1f236f6b','vdcom',null,null);\n

DROP TABLE IF EXISTS  `weixin_weixinmenu`;\n
CREATE TABLE `weixin_weixinmenu` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(11) DEFAULT NULL,
  `name` varchar(10) DEFAULT NULL,
  `type` varchar(20) DEFAULT NULL,
  `val` varchar(1000) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;\n

insert into `weixin_weixinmenu`(`id`,`pid`,`name`,`type`,`val`) values
('9','0','帮助','click','帮助'),
('10','0','活动','sub_button',''),
('11','10','拍拍乐','click','拍拍乐'),
('12','10','摇一摇','click','摇一摇'),
('13','10','投票','click','投票');\n

DROP TABLE IF EXISTS  `weixin_paipaile`;\n
CREATE TABLE `weixin_paipaile` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `openid` varchar(255) NOT NULL,
  `nickname` varchar(255) NOT NULL,
  `avatar` varchar(255) NOT NULL,
  `picurl` varchar(255) NOT NULL,
  `voteres` int(11) NOT NULL DEFAULT '0',
  `fromtype` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n

DROP TABLE IF EXISTS  `weixin_paipaile_config`;\n
CREATE TABLE `weixin_paipaile_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rule` text NOT NULL,
  `pplnum` tinyint(2) NOT NULL,
  `pplvotenum` tinyint(1) NOT NULL,
  `pplvotecannum` tinyint(2) NOT NULL,
  `pplround` int(11) NOT NULL,
  `must_switch` tinyint(1) NOT NULL DEFAULT '1',
  `black_switch` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;\n

insert into `weixin_paipaile_config`(`id`,`rule`,`pplnum`,`pplvotenum`,`pplvotecannum`,`pplround`,`must_switch`,`black_switch`) values
('1','大屏幕在点击开始游戏后，上传照片后按照提示即可参与投票，投票结束后所有参与游戏的用户将获得抽奖机会哟！赶快参与互动吧~','1','5','1','5','0','1');\n

DROP TABLE IF EXISTS  `weixin_paipaile_user`;\n
CREATE TABLE `weixin_paipaile_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `openid` varchar(255) NOT NULL,
  `nickname` varchar(255) NOT NULL,
  `avatar` varchar(255) NOT NULL,
  `fromtype` varchar(255) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n

DROP TABLE IF EXISTS  `weixin_paipaile_zjuser`;\n
CREATE TABLE `weixin_paipaile_zjuser` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `openid` varchar(255) NOT NULL,
  `nickname` varchar(255) NOT NULL,
  `avatar` varchar(255) NOT NULL,
  `fromtype` varchar(255) NOT NULL,
  `zjtype` tinyint(4) NOT NULL DEFAULT '1',
  `status` tinyint(4) NOT NULL DEFAULT '0',
  `round` int(11) NOT NULL,
  `picurl` varchar(255) DEFAULT NULL,
  `voteres` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;\n

SET FOREIGN_KEY_CHECKS = 1;\n
";
$dat = array();
$dat['datas'] = $datas;
return $dat;